<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 两栏布局之定宽+自适应：flex布局 */
        .container{
            height: 250px;
            position: relative;
            display: flex;
        }
        .left{
            background-color: red;
            width: 300px;         
        }
       
        .right{
            background-color: green;       
            flex: 1;    
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
</body>
</html>